function valbutton(thisform,objname) {
	
	var objradio = thisform.radioTK;
	var radioLength = objradio.length;
	var id, i;
	if(!radioLength){
		id = objradio.value;		
	}else{
		for(i = 0; i < radioLength; i++){
			if(thisform.radioTK[i].checked){
				id = thisform.radioTK[i].value;
				break;
			}
		}
	}
	var name = id.split('-');
	
	var lblname = objname.split('-');
	//alert(lblname);
	if(lblname.length>1){//truyen vo acctno va currcode
		var obj1 = window.opener.document.getElementById(lblname[0]);
		var obj2 = window.opener.document.getElementById(lblname[1]);
		if(obj1){
			obj1.value = name[0];
		}
		//alert(name[1]);
		if(obj2){
			for(i=0; i < obj2.length; i++){
				if(obj2.options[i].value==name[1]){
					obj2.options[i].selected = true;
					break;
				}
			}
		}
		var findvalue = window.opener.document.forms['tongquat'];
		if(findvalue){
			findvalue = findvalue.find;
			if(findvalue){
				findvalue.click();	
			}
		}
	}else{
		var obj = window.opener.document.getElementById(lblname);
		if(obj){
			obj.value = name[0];
		}
		var findvalue = window.opener.document.forms['tongquat'];
		if(findvalue){
			findvalue = findvalue.findmicro2x;
			if(findvalue){
				findvalue.click();	
			}
		}
	}
	if(window.opener.document.getElementById('SUPTYPE').value=='01'){
		window.opener.document.getElementById('EMPNO').value=window.opener.document.getElementById('SUPID').value;
	}
	window.opener.document.getElementById('submitSUPTYPE').click();
	
	window.close();
}
